// 这里放通用工具函数
export const formatDate = (timestamp) => {
  const date = new Date(Number(timestamp))
  return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')} ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`
}

export const formatPrice = (price) => {
  if (!price) return '0.00'
  return Number(price).toFixed(2)
} 